<?php 
$this->breadcrumbs()->addPage('Tipos de Processo', 'tiposprocesso');
$this->breadcrumbs()->addPage('Editar Tipo de Processo');
echo $this->breadcrumbs()->render(); 

if ($this->isEdit) {
    echo $this->tabs()->openList();
    echo $this->tabs()->addTab($this->simpleUrl('editar', null, array('id' => $this->id)), 'Dados Gerais', true);
    echo $this->tabs()->addTab($this->simpleUrl('assuntos', null, array('id' => $this->id)), 'Assuntos');
    echo $this->tabs()->closeList();
}

echo $this->pagenav()->openList(); 
echo $this->pagenav()->link($this->simpleUrl('index'), 'Voltar');
echo $this->pagenav()->defaultHelperLinks('tiposprocesso.html');
echo $this->pagenav()->closeList();
?>

<div id="article">
    <form action="" method="post">
        <?php
        echo $this->fieldList()->open();
        echo $this->fieldList()->textbox('Nome',
                                         'titulo',
                                         $this->tipoProcesso->titulo,
                                         array('required' => true, 'length' => 90));
        echo $this->fieldList()->checklist('Tipos de Manifestante',
                                           'tiposmanifestante',
                                           $this->listaTiposManifestante,
                                           $this->tiposManifestante,
                                           array('required' => true));
        echo $this->fieldList()->textbox('Letra',
                                         'letra',
                                         $this->tipoProcesso->letra,
                                         array('required' => true, 'length' => 2));
        echo $this->fieldList()->select('Tramitação',
                                        'tramitacao',
                                        $this->listaTiposTramitacao,
                                        $this->tipoProcesso->tramitacao->id,
                                        array('required' => true));
        echo $this->fieldList()->select('Abrangência',
                                        'abrangencia',
                                        $this->listaTiposAbrangencia,
                                        $this->tipoProcesso->abrangencia->id,
                                        array('required' => true));
        echo $this->fieldList()->checkbox('Simples',
                                          'simples',
                                          $this->tipoProcesso->simples,
                                          array('required' => true));
        echo $this->fieldList()->checkbox('Envolvido Sigiloso',
                                          'envolvidoSigiloso',
                                          $this->tipoProcesso->envolvidoSigiloso);
        echo $this->fieldList()->textarea('Observacao',
                                          'observacao',
                                          $this->tipoProcesso->observacao);
        echo $this->fieldList()->close();
        
        echo $this->buttonlist()->open();
        echo $this->buttonlist()->button('Salvar');
        echo $this->buttonlist()->resetbutton();
        echo $this->buttonlist()->close(true); 
        ?>
    </form>
</div>